﻿// 52. [字符串]字符串相等 http://oj.rnd.huawei.com/problems/52/details
//两个由大小写字母和空格组成的字符串s1和 s2，它们的长度都不超过 100 个字符。
//判断压缩掉空格、并忽略大小写后，这两个字符串在是否相等。
// 输入  asdf
// aSDf
// asdf aaa
// aSdf    aaa
// 输出 Yes
// Yes

// we have defined the necessary header files here for this problem.
// If additional header files are needed in your program, please import here.
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;

// 删除空格
void removeBlank(string& str) {
  for (auto it = str.begin(); it != str.end();) {
    if (*it == ' ') {
      it = str.erase(it);
    } else {
      *it = tolower(*it);
      it++;
    }
  }
}

int main() {
  string c1 = "asdf   AAA";
  string c2 = "aSDf    aaa";

  while (getline(cin, c1) && getline(cin, c2)) {
    string out1, out2;
    removeBlank(c1);
    removeBlank(c2);
    if (c1.compare(c2) == 0) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
  }
  return 0;
}
